// $ANTLR : "AnasintGDL.g" -> "AnasintGDL.java"$

package pl.prac06;

import antlr.TokenBuffer;
import antlr.TokenStreamException;
import antlr.TokenStreamIOException;
import antlr.ANTLRException;
import antlr.LLkParser;
import antlr.Token;
import antlr.TokenStream;
import antlr.RecognitionException;
import antlr.NoViableAltException;
import antlr.MismatchedTokenException;
import antlr.SemanticException;
import antlr.ParserSharedInputState;
import antlr.collections.impl.BitSet;

public class AnasintGDL extends antlr.LLkParser       implements AnasintGDLTokenTypes
 {

protected AnasintGDL(TokenBuffer tokenBuf, int k) {
  super(tokenBuf,k);
  tokenNames = _tokenNames;
}

public AnasintGDL(TokenBuffer tokenBuf) {
  this(tokenBuf,3);
}

protected AnasintGDL(TokenStream lexer, int k) {
  super(lexer,k);
  tokenNames = _tokenNames;
}

public AnasintGDL(TokenStream lexer) {
  this(lexer,3);
}

public AnasintGDL(ParserSharedInputState state) {
  super(state,3);
  tokenNames = _tokenNames;
}

	public final void entrada() throws RecognitionException, TokenStreamException {
		
		
		graph();
		match(Token.EOF_TYPE);
	}
	
	public final void graph() throws RecognitionException, TokenStreamException {
		
		
		match(GRAPH);
		match(DOS_PUNTOS);
		match(ABRE_LLAVE);
		{
		_loop17:
		do {
			switch ( LA(1)) {
			case NODE:
			{
				node();
				break;
			}
			case EDGE:
			{
				edge();
				break;
			}
			default:
			{
				break _loop17;
			}
			}
		} while (true);
		}
		match(CIERRA_LLAVE);
	}
	
	public final void node() throws RecognitionException, TokenStreamException {
		
		
		match(NODE);
		match(DOS_PUNTOS);
		match(ABRE_LLAVE);
		{
		_loop20:
		do {
			switch ( LA(1)) {
			case TITLE:
			{
				title();
				break;
			}
			case LABEL:
			{
				label();
				break;
			}
			case BORDERSTYLE:
			{
				borderstyle();
				break;
			}
			default:
			{
				break _loop20;
			}
			}
		} while (true);
		}
		match(CIERRA_LLAVE);
	}
	
	public final void edge() throws RecognitionException, TokenStreamException {
		
		
		match(EDGE);
		match(DOS_PUNTOS);
		match(ABRE_LLAVE);
		{
		_loop23:
		do {
			switch ( LA(1)) {
			case SOURCE:
			{
				source();
				break;
			}
			case TARGET:
			{
				target();
				break;
			}
			case ARROWSTYLE:
			{
				arrowstyle();
				break;
			}
			default:
			{
				break _loop23;
			}
			}
		} while (true);
		}
		match(CIERRA_LLAVE);
	}
	
	public final void title() throws RecognitionException, TokenStreamException {
		
		
		match(TITLE);
		match(DOS_PUNTOS);
		match(TEXTO);
	}
	
	public final void label() throws RecognitionException, TokenStreamException {
		
		
		match(LABEL);
		match(DOS_PUNTOS);
		match(TEXTO);
	}
	
	public final void borderstyle() throws RecognitionException, TokenStreamException {
		
		
		match(BORDERSTYLE);
		match(DOS_PUNTOS);
		{
		valor();
		}
	}
	
	public final void source() throws RecognitionException, TokenStreamException {
		
		
		match(SOURCE);
		match(DOS_PUNTOS);
		match(TEXTO);
	}
	
	public final void target() throws RecognitionException, TokenStreamException {
		
		
		match(TARGET);
		match(DOS_PUNTOS);
		match(TEXTO);
	}
	
	public final void arrowstyle() throws RecognitionException, TokenStreamException {
		
		
		match(ARROWSTYLE);
		match(DOS_PUNTOS);
		{
		valor();
		}
	}
	
	public final void valor() throws RecognitionException, TokenStreamException {
		
		
		switch ( LA(1)) {
		case NONE:
		{
			match(NONE);
			break;
		}
		case DOTTED:
		{
			match(DOTTED);
			break;
		}
		default:
		{
			throw new NoViableAltException(LT(1), getFilename());
		}
		}
	}
	
	
	public static final String[] _tokenNames = {
		"<0>",
		"EOF",
		"<2>",
		"NULL_TREE_LOOKAHEAD",
		"\"graph\"",
		"\"node\"",
		"\"edge\"",
		"\"title\"",
		"\"label\"",
		"\"target\"",
		"\"source\"",
		"\"borderstyle\"",
		"\"arrowstyle\"",
		"\"line\"",
		"\"none\"",
		"\"dotted\"",
		"\"solid\"",
		"\"dashed\"",
		"NUEVA_LINEA",
		"BLANCO",
		"LETRA",
		"DIGITO",
		"ID",
		"COMENTARIO",
		"ABRE_LLAVE",
		"CIERRA_LLAVE",
		"DOS_PUNTOS",
		"TEXTO"
	};
	
	
	}
